import http from "@/common/http/request";
import { 
  musicNoticeListInterface,
  musicNoticeAddInterface,
  musicNoticeUpdateInterface,
} from "./notice.interface";
// 通知列表
export const $musicSongList = (data: musicNoticeListInterface) => {
  const $http = new http();
  return $http.get({
    url: '/music/notice/list',
    data,
  })
}

// 通知详情
export const $musicNoticeDetail = (noticeId: string) => {
  const $http = new http();
  return $http.get({
    url: `/music/notice/${noticeId}`,
  })
}

// 新增通知
export const $musicNoticeAdd = (data: musicNoticeAddInterface) => {
  const $http = new http();
  return $http.post({
    url: '/music/notice',
    data,
  })
}

// 修改通知
export const $musicNoticeUpdate = (data: musicNoticeUpdateInterface) => {
  const $http = new http();
  return $http.put({
    url: '/music/notice',
    data,
  })
}

// 删除通知
export const $musicNoticeDelete = (data: Array<string>) => {
  const $http = new http();
  return $http.delete({
    url: `/music/notice/${data.join(',')}`,
  })
}